{{csrf_field()}}


<div class="layui-form-item layui-col-md6">
    <label for="" class="layui-form-label">选择优惠券活动</label>
    <div class="layui-input-block">
        <select name="activity_sale_id" lay-verify="required"  >
            <option value="" >选择优惠券活动</option>
            @foreach ($activity as $v)
                <option value="{{$v['id'] ?? 0}}" >{{$v['activity_name'] ?? ''}}</option>
            @endforeach
        </select>
    </div>
</div>

<div class="layui-form-item layui-col-md6">
    <label for="" class="layui-form-label">每人最大发放数量</label>
    <div class="layui-input-block">
        <input type="text" name="number" value="1" lay-verify="number" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" placeholder="每人最大发放数量" class="layui-input" >
    </div>
</div>

<div class="layui-form-item  ">
    <div class="layui-inline">
        <label for=""  class="layui-form-label">优惠类型</label>
        <div class="layui-input-block">
            <input type="radio" lay-filter="radio"  name="rule_type" value="1" title="指定用户"  >
            <input type="radio" lay-filter="radio"  name="rule_type" value="2" title="指定会员等级" checked  >
            <input type="radio" lay-filter="radio"  name="rule_type" value="3" title="全部用户"  >
        </div>
    </div>
</div>
    <div class="layui-input-block">
        <div class="layui-inline count2">
            @foreach ($level as $v)
            <input type="checkbox" value="{{$v['id'] ?? 0}}"  name="level[]"   title="{{$v['level_name'] ?? ''}}">
            @endforeach
        </div>
        <div class="layui-card-body count1">
            <div class="layui-card">
                <div class="layui-form layui-card-header layuiadmin-card-header-auto">
                    <div class="layui-form-item layui-row">

                        <div class="layui-inline layui-col-xs3 layui-col-sm3 layui-col-md3">
                            <label class="layui-form-label">注册时间</label>
                            <div class="layui-input-block">
                                <input type="text" name="datetime" class="layui-input" id="datetime-pick" placeholder=" - " readonly>
                            </div>
                        </div>


                        <div class="layui-inline layui-col-xs2 layui-col-sm2 layui-col-md2">
                            <label class="layui-form-label">会员身份</label>
                            <div class="layui-input-block">
                                <select name="user_type" >
                                    <option value=''>全部</option>
                                    @foreach (\App\Models\User::USER_TYPE as $id => $name)
                                        <option value="{{$id}}">{{$name}}</option>
                                    @endforeach
                                </select>
                            </div>
                        </div>


                        <div class="layui-inline layui-col-xs3 layui-col-sm3 layui-col-md3">
                            <label class="layui-form-label">会员信息</label>
                            <div class="layui-input-block">
                                <input type="text" name="name" placeholder="会员姓名、手机号码、员工ID" autocomplete="off" class="layui-input">
                            </div>
                        </div>



                        <div class="layui-inline">
                            <div class="layui-btn-group layui-input-block">
                                <button type="button" class="layui-btn layui-btn-sm layui-input-block layuiadmin-btn-admin" lay-submit lay-filter="LAY-search">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-tab-content" style="height: 100px;">
                    <label for=""  class="layui-form-label">选中的会员昵称</label>
                    <div class="user_name_list"></div>

                </div>
                <table class="layui-hide" id="test" lay-filter="test"></table>
            </div>
            <input type="hidden" value=""  name="user_list"   >
        </div>

    </div>
<div class="layui-form-item">
    <div class="layui-input-block">
        {{isset($data) ? method_field('PUT') : ''}}
        {{csrf_field()}}
        <button type="submit" class="layui-btn" lay-submit="" lay-filter="layui-form-submit">确 认</button>
        <a  class="layui-btn" href="{{route('marketing.index')}}" >返 回</a>
    </div>
</div>

